package Demo_0506;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/5/6 10:36
 **/
public class Demo1 {
    public static void main(String[] args) {
        System.out.println(digui(6));
        System.out.println(digui2(6));
    }
    public static int digui(int n){
        if (n==1){
            return 1;
        }
        return digui(n-1)+4;
    }
    public static int digui2(int n){
        int sum = 1;
        for (int i=1;i<n;i++){
            sum += 4;
        }
        return sum;
    }
}

